<?php
$ci = &get_instance();
$ci->session->set_flashdata('detalle', $detalle);
//print_r($detalle);
?>
<legend>RECIBO DE PAGOS</legend>
<form name="forma" class="well form-horizontal span8" action="<?php echo base_url() . "admin.php/recibo/ingresodatos" ?>" method="post" >
    <div class="control-group">
        <label class="control-label" for="input01">N&uacute;mero del Recibo</label>
        <div class="controls">
            <!--<input type="text" class="input-medium span2"  name="recibo" value= "<?php echo $nro_recibo; ?>"disabled> -->

        </div>

    </div>

    <input type="hidden" name="id_matr" value="<?php echo $id_matr; ?>">
    <input type="hidden" name="ide_lec" value="<?php echo $ide_lec; ?>">
    <div class="control-group">
        <label class="control-label" for="input01">N&uacute;mero de Identificaci&oacute;n</label>
        <div class="controls">
            <input type="text" class="input-medium span2"  name="cedula" value= "<?php echo $cedula_pers; ?>"disabled>

        </div>

    </div>
    <input type="hidden" name="cedula_pers" value="<?php echo $cedula_pers; ?>">

    <div class="control-group">
        <label class="control-label" for="input02">Apellidos y Nombres </label>
        <div class="controls">
            <input type="text" class="input-medium span4"  name="nombres" value= "<?php echo ($apellido_pers . "  " . $nombre_pers); ?>" disabled>

        </div>
    </div>
    <input type="hidden" name="nombre_pers" value="<?php echo ($apellido_pers . "  " . $nombre_pers); ?>">






    <div class="control-group">
        <label class="control-label" for="input06">Direccion del Domicilio</label>
        <div class="controls">
            <input type="text" class="input-medium span4"  name="direccion" value= "<?php echo $direccion_pers; ?>"disabled>

        </div>
    </div>
    <input type="hidden" name="direccion_pers" value="<?php echo $direccion_pers; ?>">


    <div class="control-group">
        <label class="control-label" for="select03">Fecha de Pago</label>
        <div class="controls">
            <input type="text" class="input-medium "  name="fecha_pago" value="<?php echo date('Y-m-d'); ?>" disabled>

        </div>
    </div>
    <input type="hidden" name="fecha_nac_pers" value="<?php echo date('Y-m-d'); ?>">

    <div class="control-group">
        <label class="control-label" for="input08">N&uacute;mero de tel&eacute;fono</label>
        <div class="controls">
            <input type="text" class="input-medium span2"  name="fono" value= "<?php $fono_pers; ?>" disabled>

        </div>
    </div>
    <input type="hidden" name="fono_pers" value="<?php $fono_pers; ?>">


    <div class="control-group">
        <label class="control-label" for="input02">PAGO INICIAL</label>
        <div class="controls">
            <input type="text" class="input-medium span2"  id="pago_i" name="monto_canc" value="<?php echo $monto_canc_matr; ?>" disabled>

        </div>
    </div>
    <input type="hidden" name="monto_canc_matr" value="<?php echo $monto_canc_matr; ?>">
     <input type="hidden" name="concepto" value="<?php echo ($concepto); ?>">

    <div class="control-group">
        <label class="control-label" for="input02">TIPO DE DOCUMENTOS</label>
        <div class="controls">
            <select id="select21"  class="span2" name="tipo_doc_pago_mat">
                <?php
                switch ($tipo_doc_pago_mat) {
                    case 1:echo ("<option value='1'>EFECTIVO</option>");
                        break;
                    case 2:echo ("<option value='2'>CHEQUE</option>");
                        break;
                    case 3:echo ("<option value='3'>DEPOSITO</option>");
                        break;
                    case 4:echo ("<option value='4'>TARJETA</option>");
                        break;
                    case 5:echo ("<option value='5'>EFECTIVO-CHEQUE</option>");
                        break;
                    case 6:echo ("<option value='6'>EFECTIVO-DEPOSITO</option>");
                        break;
                    case 7:echo ("<option value='7'>EFECTIVO-TARJETA</option>");
                        break;

                    }
                ?>

            </select>
        </div>
    </div>
    <?php if ($tipo_doc_pago_mat == 1) { //efectivo ?> 
        <input type="hidden" name="nom_doc_pago_mat" value="EFECTIVO">
        <input type="hidden" name="nro_comp_pago_mat" value="NINGUNO">
        <input type="hidden" name="lote_doc_pago_mat" value="NINGUNO">
        <input type="hidden" name="ref_doc_pago_mat" value="NINGUNO">
        <input type="hidden" name="monto_efec_doc_pago" value="0">
        <input type="hidden" name="monto_rest_doc_pago" value="0">
        <input type="hidden" name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>">
        


    <?php } ?>
    <?php if ($tipo_doc_pago_mat == 2) { //cheque ?>
        <div class="control-group">
            <label class="control-label" for="input01">NOMBRE DEL BANCO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nom_doc_pago_mat" value="<?php echo ($nom_doc_pago_mat); ?>" >

            </div>
        </div>  

        <div class="control-group">
            <label class="control-label" for="input02">NRO DEL CHEQUE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>
        <input type="hidden" name="lote_doc_pago_mat" value="NINGUNO">
        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div> 
        <input type="hidden" name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>">
        <input type="hidden" name="monto_efec_doc_pago" value="0">
        <input type="hidden" name="monto_rest_doc_pago" value="0">
        

    <?php } ?>

    <?php if ($tipo_doc_pago_mat == 3) {
        //deposito ?>


        <div class="control-group">
            <label class="control-label" for="input02">NUMERO DE LA CUENTA</label>
            <div class="controls">
                <select id="select01"  name="nom_doc_pago_mat">
                    <?php
                        foreach ($cuentas as $k => $cuenta) {
                            echo ("<option value='" . $cuenta["cuenta1_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta1_inst"]? " selected" : " "))."/>");
                            echo ($cuenta["cuenta1_inst"] . "-" . $cuenta["banco1_inst"] . "</option>");
                            echo ("<option value='" . $cuenta["cuenta2_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta2_inst"]? " selected" : " "))."/>");;
                            echo ($cuenta["cuenta2_inst"] . "-" . $cuenta["banco2_inst"] . "</option>");
                            echo ("<option value='" . $cuenta["cuenta3_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta3_inst"]? " selected" : " "))."/>");;
                            echo ($cuenta["cuenta3_inst"] . "-" . $cuenta["banco3_inst"] . "</option>");
                        }
                        ?>

                </select>

            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">NRO DEL DEPOSITO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>  
        <input type="hidden" name="lote_doc_pago_mat" value="NINGUNO">
        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="select012">FECHA DEL DEPOSITO</label>
            <div class="controls">

                <input type="text" readonly="true" class="input-medium "  name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>" >

            </div>
        </div>
        
        <input type="hidden" name="monto_efec_doc_pago" value="0">
        <input type="hidden" name="monto_rest_doc_pago" value="0">
        
    <?php 
    
    if(isset($nrodepos)&& $nrodepos>1 ){
        echo ("<input type='hidden' name='nrodepos' value='".$nrodepos."'>");
        switch ($nrodepos){
                        case 2:
                            ?>
                            <div id="panel32"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO1</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago31" value="<?php echo ($monto_rest_doc_pago31); ?>" >

                                </div>
                            </div>  
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat32" value="<?php echo ($nro_comp_pago_mat32); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat32" value="<?php echo ($ref_doc_pago_mat32); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat12" value="<?php echo ($fechadep_doc_pago_mat12); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago32" value="<?php echo ($monto_rest_doc_pago32); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->       
                            <?break;
                        case 3: ?>
                            <div id="panel32"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO1</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago31" value="<?php echo ($monto_rest_doc_pago31); ?>" >

                                </div>
                            </div>  
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat32" value="<?php echo ($nro_comp_pago_mat32); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat32" value="<?php echo ($ref_doc_pago_mat32); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat12" value="<?php echo ($fechadep_doc_pago_mat12); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago32" value="<?php echo ($monto_rest_doc_pago32); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->
                            <div id="panel33"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat33" value="<?php echo ($nro_comp_pago_mat33); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat33" value="<?php echo ($ref_doc_pago_mat33); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO3</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat13" value="<?php echo ($fechadep_doc_pago_mat13); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago33" value="<?php echo ($monto_rest_doc_pago33); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito3 -->
   

                                    <?break;
                        case 4: ?>
                            <div id="panel32"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO1</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago31" value="<?php echo ($monto_rest_doc_pago31); ?>" >

                                </div>
                            </div>  
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat32" value="<?php echo ($nro_comp_pago_mat32); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat32" value="<?php echo ($ref_doc_pago_mat32); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat12" value="<?php echo ($fechadep_doc_pago_mat12); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago32" value="<?php echo ($monto_rest_doc_pago32); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->
                            <div id="panel33"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat33" value="<?php echo ($nro_comp_pago_mat33); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat33" value="<?php echo ($ref_doc_pago_mat33); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO3</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat13" value="<?php echo ($fechadep_doc_pago_mat13); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago33" value="<?php echo ($monto_rest_doc_pago33); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito3 -->
                            <div id="panel34"  >
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO4</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat34" value="<?php echo ($nro_comp_pago_mat34); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE4</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat34" value="<?php echo ($ref_doc_pago_mat34); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO4</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat14" value="<?php echo ($fechadep_doc_pago_mat14); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO4</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago34" value="<?php echo ($monto_rest_doc_pago34); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito4 -->
        
                            <?break;


         }
        }
    
    
    } ?>
    <?php if ($tipo_doc_pago_mat == 4) { //tarjeta  ?>
        <div class="control-group">
            <label class="control-label" for="input01">NOMBRE DE LA TARJETA</label>
            <div class="controls">
                <select id="select01"  name="nom_doc_pago_mat">

                <option value="MASTER CARD" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "MASTER CARD"? " selected" : " ")); ?>>MASTER CARD</option>
                <option value="DINERS CLUB" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "DINERS CLUB"? " selected" : " ")); ?> >DINERS CLUB</option>
                <option value="AMERICAN EXPRESS" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "AMERICAN EXPRESS"? " selected" : " ")); ?>>AMERICAN EXPRESS</option>
                <option value="VISA BANCO AUSTRO" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "VISA BANCO AUSTRO"? " selected" : " ")); ?>>VISA BANCO AUSTRO</option>
                <option value="VISA BANCO MACHALA" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "VISA BANCO MACHALA"? " selected" : " ")); ?>>VISA BANCO MACHALA</option>
                </select>
            </div>
        </div>


        <div class="control-group">
            <label class="control-label" for="input02">NUMERO TARJETA</label>

            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>



        <div class="control-group">
            <label class="control-label" for="input02">LOTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="lote_doc_pago_mat" value="<?php echo ($lote_doc_pago_mat); ?>" >

            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div>  
        <input type="hidden" name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>">

        <input type="hidden" name="monto_efec_doc_pago" value="0">
        <input type="hidden" name="monto_rest_doc_pago" value="0">

    <?php } ?>
        
    <?php if ($tipo_doc_pago_mat == 5) { //cheque ?>
        <div class="control-group">
            <label class="control-label" for="input01">NOMBRE DEL BANCO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nom_doc_pago_mat" value="<?php echo ($nom_doc_pago_mat); ?>" >

            </div>
        </div>  

        <div class="control-group">
            <label class="control-label" for="input02">NRO DEL CHEQUE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>
        <input type="hidden" name="lote_doc_pago_mat" value="NINGUNO">
        <input type="hidden" name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>">

        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div>    
        <div class="control-group">
            <label class="control-label" for="input03">MONTO DEL CHEQUE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_rest_doc_pago" value="<?php echo ($monto_rest_doc_pago); ?>" >

            </div>
        </div>    
        <div class="control-group">
            <label class="control-label" for="input03">MONTO EN EFECTIVO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_efec_doc_pago" value="<?php echo ($monto_efec_doc_pago); ?>" >

            </div>
        </div>    
        

    <?php } ?>

    <?php if ($tipo_doc_pago_mat == 6) {//deposito ?>


        <div class="control-group">
            <label class="control-label" for="input02">NUMERO DE LA CUENTA</label>
            <div class="controls">
                <select id="select01"  name="nom_doc_pago_mat">
                    <?php
                        foreach ($cuentas as $k => $cuenta) {
                            echo ("<option value='" . $cuenta["cuenta1_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta1_inst"]? " selected" : " "))."/>");
                            echo ($cuenta["cuenta1_inst"] . "-" . $cuenta["banco1_inst"] . "</option>");
                            echo ("<option value='" . $cuenta["cuenta2_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta2_inst"]? " selected" : " "))."/>");;
                            echo ($cuenta["cuenta2_inst"] . "-" . $cuenta["banco2_inst"] . "</option>");
                            echo ("<option value='" . $cuenta["cuenta3_inst"] . "'" .(!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == $cuenta["cuenta3_inst"]? " selected" : " "))."/>");;
                            echo ($cuenta["cuenta3_inst"] . "-" . $cuenta["banco3_inst"] . "</option>");
                        }
                        ?>

                </select>

            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">NRO DEL DEPOSITO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>  
        <input type="hidden" name="lote_doc_pago_mat" value="NINGUNO">
        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div> 
        <div class="control-group">
            <label class="control-label" for="select012">FECHA DEL DEPOSITO</label>
            <div class="controls">

                <input type="text" readonly="true" class="input-medium "  name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>" >

            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label" for="input03">MONTO DEL DEPOSITO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_rest_doc_pago" value="<?php echo ($monto_rest_doc_pago); ?>" >

            </div>
        </div>    
        <div class="control-group">
            <label class="control-label" for="input03">MONTO EN EFECTIVO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_efec_doc_pago" value="<?php echo ($monto_efec_doc_pago); ?>" >

            </div>
        </div>    
        
       <?php 
    if(isset($nroefecdepos)&& $nroefecdepos>1 ){
            echo ("<input type='hidden' name='monto_rest_doc_pago61' value='".$monto_rest_doc_pago61."'>");
            echo ("<input type='hidden' name='nroefecdepos' value='".$nroefecdepos."'>");
        switch ($nroefecdepos){
                        case 2:
                            ?>
                            <div id="panel62"  >
                                
  
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat62" value="<?php echo ($nro_comp_pago_mat62); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat62" value="<?php echo ($ref_doc_pago_mat62); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat22" value="<?php echo ($fechadep_doc_pago_mat22); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago62" value="<?php echo ($monto_rest_doc_pago62); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->
                            <?break;
                        case 3: ?>
                            <div id="panel62"  >
                                

                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat62" value="<?php echo ($nro_comp_pago_mat62); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat62" value="<?php echo ($ref_doc_pago_mat62); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat22" value="<?php echo ($fechadep_doc_pago_mat22); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago62" value="<?php echo ($monto_rest_doc_pago62); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->
                            <div id="panel63"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat63" value="<?php echo ($nro_comp_pago_mat63); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat63" value="<?php echo ($ref_doc_pago_mat63); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO3</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat23" value="<?php echo ($fechadep_doc_pago_mat23); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago63" value="<?php echo ($monto_rest_doc_pago63); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito3 -->                            
   

                                    <?break;
                        case 4: ?>
                            <div id="panel62"  >
                                
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat62" value="<?php echo ($nro_comp_pago_mat62); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE2</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat62" value="<?php echo ($ref_doc_pago_mat62); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO2</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat22" value="<?php echo ($fechadep_doc_pago_mat22); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO2</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago62" value="<?php echo ($monto_rest_doc_pago62); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito2 -->
                            <div id="panel63"  >
                                
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat63" value="<?php echo ($nro_comp_pago_mat63); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE3</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat63" value="<?php echo ($ref_doc_pago_mat63); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO3</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat23" value="<?php echo ($fechadep_doc_pago_mat23); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO3</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago63" value="<?php echo ($monto_rest_doc_pago63); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito3 -->
                            <div id="panel64"  >
                            <div class="control-group">
                                <label class="control-label" for="input01">NRO DEL DEPOSITO4</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2" name="nro_comp_pago_mat64" value="<?php echo ($nro_comp_pago_mat64); ?>" >

                                </div>
                            </div>  
                            <div class="control-group">
                                <label class="control-label" for="input03">REFERENTE4</label>
                                <div class="controls">
                                    <input type="text" class="input-medium span2"   name="ref_doc_pago_mat64" value="<?php echo ($ref_doc_pago_mat64); ?>" >

                                </div>
                            </div>  
                        <div class="control-group">
                            <label class="control-label" for="select012">FECHA DEL DEPOSITO4</label>
                            <div class="controls">

                                <input type="text" class="input-medium "  id="datepicker2" name="fechadep_doc_pago_mat24" value="<?php echo ($fechadep_doc_pago_mat24); ?>" >

                            </div>
                        </div>
                            <div class="control-group">
                                <label class="control-label" for="input03">MONTO DEL DEPOSITO4</label>
                                <div class="controls">
                                    <input type="number" step="0.01" class="input-medium span1"   name="monto_rest_doc_pago64" value="<?php echo ($monto_rest_doc_pago64); ?>" >

                                </div>
                            </div>  
                            </div><!-- fin deposito4 -->
        
                            <?break;


         }
        }
    
    
    } ?>

    <?php if ($tipo_doc_pago_mat == 7) { //tarjeta  ?>
        <div class="control-group">
            <label class="control-label" for="input01">NOMBRE DE LA TARJETA</label>
            <div class="controls">
                <select id="select01"  name="nom_doc_pago_mat">

                <option value="MASTER CARD" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "MASTER CARD"? " selected" : " ")); ?>>MASTER CARD</option>
                <option value="DINERS CLUB" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "DINERS CLUB"? " selected" : " ")); ?> >DINERS CLUB</option>
                <option value="AMERICAN EXPRESS" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "AMERICAN EXPRESS"? " selected" : " ")); ?>>AMERICAN EXPRESS</option>
                <option value="VISA BANCO AUSTRO" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "VISA BANCO AUSTRO"? " selected" : " ")); ?>>VISA BANCO AUSTRO</option>
                <option value="VISA BANCO MACHALA" <?php echo (!isset($nom_doc_pago_mat) ? " " : ($nom_doc_pago_mat == "VISA BANCO MACHALA"? " selected" : " ")); ?>>VISA BANCO MACHALA</option>
                </select>
            </div>
        </div>


        <div class="control-group">
            <label class="control-label" for="input02">NUMERO TARJETA</label>

            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2" name="nro_comp_pago_mat" value="<?php echo ($nro_comp_pago_mat); ?>" >

            </div>
        </div>



        <div class="control-group">
            <label class="control-label" for="input02">LOTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="lote_doc_pago_mat" value="<?php echo ($lote_doc_pago_mat); ?>" >

            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="input03">REFERENTE</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span2"   name="ref_doc_pago_mat" value="<?php echo ($ref_doc_pago_mat); ?>" >

            </div>
        </div> 
        <div class="control-group">
            <label class="control-label" for="input03">MONTO DE LA TARJETA</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_rest_doc_pago" value="<?php echo ($monto_rest_doc_pago); ?>" >

            </div>
        </div>    
        <div class="control-group">
            <label class="control-label" for="input03">MONTO EN EFECTIVO</label>
            <div class="controls">
                <input type="text" readonly="true" class="input-medium span1"   name="monto_efec_doc_pago" value="<?php echo ($monto_efec_doc_pago); ?>" >

            </div>
        </div>   
       <input type="hidden" name="fechadep_doc_pago_mat" value="<?php echo ($fechadep_doc_pago_mat); ?>">

        
    <?php } ?>


    <input type="hidden" name="pagina" value="<?php echo $pagina; ?>">
    <div class="controls">


        <button type="button" class="btn" onclick="forma.submit()">Grabar Recibo</button>


    </div> 



</form>


